package edu.gatech.cs2340.group7.wheresmystuffapp.model;

import java.util.HashMap;
import java.util.Map;

/**
 * Old class for data handling before SQLiteDatabase was implemented
 * @author tbowling3
 *
 */
public class DataManager {

	private static Map<String, Account> nameToAccount = new HashMap<String, Account>();
	private static Account currentAccount;

	

	public static void setCurrentAccount(Account canILogin) {
		currentAccount = canILogin;
	}

	/**
	 * @return The current account using the application
	 */
	public static Account getCurrentAccount() {
		return currentAccount;
	} // close getCurrentUser
	
	/**
	 * 
	 * @return The username of the current Account
	 */
	public static String getCurrentAccountName() {
		if(currentAccount != null) {
			return currentAccount.getEmail();
		} else { 
			return "No Current User"; 
		}
	}

	



} // close class